
<table class="table table-bordered table-hover" id="user-list">
    <thead>
        <tr>
            <th>玩家名称</th>
            <th>玩家头像</th>
            <th>本局得分</th>
        </tr>
    </thead>    
    <tbody> 
        @foreach($users as $user)
            <tr>
                <td>{{$user['name']}}</td>
                <td><img src="{{$user['avatar']}}" style="width:20px"></td>
                <td>{{$user['score']}}</td>
            </tr>
        @endforeach
    </tbody>
</table>

<script type="text/javascript">
    $(function () {
        $('#user-list').DataTable({
          "paging": false,
          "lengthChange": false,
          "searching": false,
          "info": false,
          "autoWidth": true,
          "columns": [
            {"orderable": false},
            {"orderable": false},
            {"orderable": true}
          ]
        });
    });
</script>    
